/**
 * @description:用户余额显示
 * @author:elvis
 */
import { useState, useEffect, useMemo } from 'react';
import { useNavigate } from 'react-router-dom';
import { Avatar, Button, Divider, Modal, Switch, Popover, message } from 'antd';
import PhoneModal from '@/pages/AccountModule/accountSafety/component/PhoneNmberModal/PhoneNmberModal';
import PayModal from '@/pages/AccountModule/accountSafety/component/PayModal/PayModal';
import RechargeModal from '../component/RechargeModal/index';
import TransferModal from '../component/TransferModal/index';
import ScanRechargeModal from '../component/ScanRechargeModal/index';
import BalanceRechargeModal from '../component/BalanceRechargeModal';
import SecondAccountModal from '../../../common/SecondAccountModal';
import AttestationDetail from '../../../common/AttestationDetail';
import AddAuthentication from '../../../common/AddAuthentication';
import OpenPayModal from './OpenPayModal';
import LogsModal from './LogsModal';
import CommonLoading from '@/components/CommonLoading';
import { getDifferUserDetails } from '@/utils/authority';
import { formatAmount } from '@/utils/utils.jsx';
import IconFont from '@/components/IconFont';
import { UserOutlined } from '@ant-design/icons';
import { getApplyDetails } from '@/pages/AccountModule/applyCash/service';
import { find } from 'lodash';
import {
  getAccountInfoOp,
  getAccountBalanceOp,
  jstAutoPayConfigViewOp,
  jstAutoPayConfigOp,
  getAttestation,
  getBankListDetails,
  OpenOfflineRecharge,
  queryAutoPay,
  closeAutoPay,
  queryAutoUser
} from '../../service';
import styles from './index.module.less';

const currentUser = getDifferUserDetails(),
  isDushang = currentUser.uuid == 390078;

let timer = undefined,
  referType = undefined;

const UserInfo = ({ type, accountMsg, infoKey, balanceKey, dispatch, handleJump }) => {
  //用于展示的用户信息
  const [accountDetail, setAccounrDetail] = useState({});
  const [bankDetail, setBankDetail] = useState({});
	const navigate = useNavigate();
  //控制按钮操作的弹框
  const [visible, setVisible] = useState(undefined);

  //可用余额显隐状态
  const [canUseAmount, setCanUse] = useState(true);

  //提现待到账金额显隐状态
  const [awaitAmount, setAwait] = useState(true);

  //抵扣金额显隐状态
  const [deductionAmount, setDeduction] = useState(true);

  //认证信息
  const [accountExtend, setAccountExtend] = useState({});

  const [needBindCard, setNeedBindCard] = useState(false); //二类户是否需要绑卡

  const [isOpenOfflineRecharge, setisOpenOfflineRecharge] = useState(false);

  //用户信息
  const [userAccountType, setUserType] = useState({});
  //自动支付信息
  const [aotoPayObj, setAotoPayObj] = useState({});
  const [loading, setLoading] = useState(false);
  const [isOpen, setIsopen] = useState(false);
  const [noLimitUsers, setNoLimitUsers] = useState([]); //没有自动开关权限的uuid

  const {
    autoState,
    mobile,
    payPassword,
    headImgUrl,
    availBalance = 0,
    cashBalance = 0,
    deductionBalance = 0,
    purchaseDeductionBalance = 0,
    bigAccount,
    hasOpenAccount,
    hasOpenClassIIAccount,
    isSign,
    // userType,
  } = accountDetail;

  const { userType } = userAccountType;
  const { openStatus, orderSn } = aotoPayObj;

  //获取用户信息
  const getAccountInfo = async () => {
    setLoading(true);
    const User = getAccountInfoOp({ userId: currentUser.uuid });
    const Balance = getAccountBalanceOp({ accountType: type });
    const res = await Promise.all([User, Balance]);
    const obj = {};
    const userMsg = res[0];
    const balanceMsg = res[1];
    setLoading(false);
    if (userMsg.success) {
      const userData = userMsg.data;
      obj.mobile = userData.mobile; //用户手机号
      obj.payPassword = userData.payPassword; //用户密码
      obj.headImgUrl = userData.headImgUrl; //用户头像
      obj.isBindBank = userData.isBindBank; //是否绑定银行卡
    }

    if (balanceMsg.success) {
      const balanceData = balanceMsg.data;
      obj.availBalance = balanceData.availBalance; //可用余额
      obj.cashBalance = balanceData.cashBalance; //提现待到账金额
      obj.deductionBalance = balanceData.deductionBalance; //可抵扣金额(拿货)
      obj.purchaseDeductionBalance = balanceData.purchaseDeductionBalance; //可抵扣金额(采购)

      obj.bigAccount = balanceData.bigAccount; //用户标识 0:普通用户 1：大用户 2：二类户体验用户（能用余额充值）
      obj.hasOpenAccount = balanceData.hasOpenAccount;
      obj.hasOpenClassIIAccount = balanceData.hasOpenClassIIAccount;
      obj.enterpriseAuthModifyState = balanceData.enterpriseAuthModifyState;
      obj.hasVirtualAccount = balanceData.hasVirtualAccount;
      obj.isSign = balanceData.isSign;
      obj.autoState = balanceData.autoState;

      //   setUserType(balanceData);
      // setAccounrDetail(balanceData);
      let userType;
      if (balanceData.bigAccount == 1) {
        userType = 1; //大用户
      } else {
        if (
          balanceData.hasOpenAccount == 1 &&
          balanceData.enterpriseAuthModifyState == 1
        ) {
          userType = 2; //普通老用户(需要补充资料)
        } else {
          userType = 3; //新用户
        }
      }
      obj.userType = userType;
    }
    setAccounrDetail(obj);
    setUserType(obj);
  };

  useEffect(() => {
    if (isDushang) {
      jstAutoPayConfigView();
    }
    getOldBindCardInfo();
    getQueryAutoPay();
    // getQueryAutoUser();
  }, []);

  useEffect(() => {
    getDataDebounce();
    getAuthenticationInfo();
    queryBankListDetails();
    handleOpenOfflineRecharge();
  }, [infoKey, balanceKey]);

  const getDataDebounce = () => {
    if (timer) {
      clearTimeout(timer);
      timer = setTimeout(() => {
        getAccountInfo();
        clearTimeout(timer);
        timer = undefined;
      }, 200);
    } else {
      timer = setTimeout(() => {
        getAccountInfo();
        clearTimeout(timer);
        timer = undefined;
      }, 200);
    }
  };

  // useEffect(() => {
  //   if (
  //     Object.keys(accountDetail).length &&
  //     //   !(bigAccount == 2 || (!hasOpenAccount && !hasOpenClassIIAccount))
  //     !(
  //       (userType == 2 && bigAccount == 2) ||
  //       (userType == 3 && hasOpenClassIIAccount && !needBindCard)
  //     )
  //   ) {
  //     getOldBindCardInfo();
  //   }
  // }, [bigAccount]);

  // 获取银行卡信息
  const getOldBindCardInfo = async () => {
    setLoading(true);
    const { success, data } = await getApplyDetails({
      accountNo: accountMsg.merchantNo,
    });
    if (success) {
      setBankDetail(data || {});
    }
    setLoading(false);
  };

  // 获取自动支付信息
  const getQueryAutoPay = async () => {
    const { success, data = {} } = await queryAutoPay();
    if (success) {
      setAotoPayObj(data);
    }
  };

  // 查询没有权限展示自动支付开关
  const getQueryAutoUser = async () => {
    const { success, data = [] } = await queryAutoUser();
    if (success) {
        setNoLimitUsers(data);
    }
  };

  // 关闭自动支付
  const closeQueryAutoPay = async () => {
    setLoading(true);
    const { success, data = {} } = await closeAutoPay();
    if (success) {
        getQueryAutoPay(data);
        message.success('关闭成功')
    }
    setLoading(false);
  };

  //自动支付的开关切换
  const handleSwitch = (e) => {
    if (e) {
      //开启
      setVisible('payOpen');
    } else {
      closeQueryAutoPay();
    }
  };

  //获取银行卡绑定列表
  const queryBankListDetails = async () => {
    setLoading(true);
    const { success, data = [] } = await getBankListDetails({});
    if (success) {
      if (data && data.length > 0) {
        const ccassIIAccount = find(data, ['channelType', 1]); //二类户
        if (ccassIIAccount && !ccassIIAccount.bankNo) {
          //已户未绑卡
          setNeedBindCard(true);
        }
      }
    }
    setLoading(false);
  };

  //获取认证信息
  const getAuthenticationInfo = async () => {
    setLoading(true);
    const { data = {}, success } = await getAttestation();
    if (success) {
      setAccountExtend(data);
    }
    setLoading(false);
  };

  //查看是否线下充值
  const handleOpenOfflineRecharge = async () => {
    setLoading(true);
    const { data, success } = await OpenOfflineRecharge();
    if (success) {
      setisOpenOfflineRecharge(data);
    }
    setLoading(false);
  };

  const jstAutoPayConfigView = async () => {
    const { data, success } = await jstAutoPayConfigViewOp();
    if (success) {
      setIsopen(data);
    }
  };

  const jstAutoPayConfig = async (isOpen) => {
    setLoading(true);
    const { success } = await jstAutoPayConfigOp({ isOpen });
    if (success) {
      setIsopen(isOpen);
    }
    setLoading(false);
  };

  //点击修改/设置密码
  const handlePasswordClick = () => {
    if (currentUser.parentId) {
      Modal.info({
        content: '子账号不允许设置、修改支付密码',
      });
      return;
    }
    setVisible('updatePassword');
  };

  //点击线下充值
  const offlineRechargeClick = () => {
    navigate('/account/offlineRecharge');
  };

  //点击申请提现
  const applyCashClick = () => {
    if (!parseFloat(availBalance)) {
      Modal.info({
        title: '温馨提示',
        content: '当前可提现余额为0， 不可提现',
      });
      return;
    }
    if (userType == 1) {
      //大用户
      if (hasOpenAccount) {
        navigate('/account/applyCash');
      } else {
        //未开通见证宝
        Modal.confirm({
          content,
          title: '温馨提示',
          okText: '下一步',
          onOk() {
            if (Object.keys(accountExtend).length == 0) {
              setVisible('authentication');
            } else {
              setVisible('openAccount');
            }
          },
        });
      }
    } else {
      if (!hasOpenClassIIAccount) {
        let content =
          '鉴于银行监管要求，为了不影响后续系统操作，需要您完善资料进行实名验证，才能进行提现！';
        if (userType == 3) {
          //新用户
          content = '您还未开户，请先完成开户绑卡操作，再进行提现';
        }
        Modal.confirm({
          content,
          title: '温馨提示',
          okText: '下一步',
          onOk() {
            if (Object.keys(accountExtend).length == 0) {
              setVisible('authentication');
            } else {
              setVisible('openAccount');
            }
          },
        });
        return;
      } else {
        if (needBindCard) {
          //需要绑卡(二类户未开户)
          Modal.confirm({
            content: '您还未开户，请先完成开户绑卡操作，再进行提现！',
            title: '温馨提示',
            okText: '去开户',
            onOk() {
              let timer = setTimeout(() => {
                navigate('/account/safety');
                clearTimeout(timer);
                timer = null;
              }, 200);
            },
          });
          return;
        }
      }
    }
    navigate('/account/applyCash');
  };

  //点击扫码充值
  const scanCodeRecharge = () => {
    if (hasOpenAccount) {
      setVisible('scanCharge');
    } else {
      //未开通见证宝
      Modal.confirm({
        content: '您还未开通账户，请先完成实名认证开户操作，再进行充值！',
        title: '温馨提示',
        okText: '下一步',
        onOk() {
          if (Object.keys(accountExtend).length == 0) {
            setVisible('authentication');
          } else {
            setVisible('openAccount');
          }
        },
      });
    }
  };

  //点击转账充值(大用户，非试点普通老用户， 未开二类户的新用户)
  const transferClick = () => {
    if (hasOpenAccount) {
      if (!bankDetail.bankNo) {
        if (bigAccount == 1) {
          Modal.confirm({
            title: '绑卡提示',
            content: '您还没有绑定银行卡，无法进行转账充值！',
            okText: '去绑卡',
            onOk() {
              //去绑卡
              navigate('/account/safety', { state: {bindCard: true }});
            },
          });
        } else {
          Modal.info({
            title: '绑卡提示',
            content: '您还没有绑定银行卡，无法进行转账充值！',
          });
        }
      } else {
        setVisible('transferCharge');
      }
    } else {
      //未开通见证宝
      Modal.confirm({
        content: '您还未开通账户，请先完成实名认证开户操作，再进行充值！',
        title: '温馨提示',
        okText: '下一步',
        onOk() {
          if (Object.keys(accountExtend).length == 0) {
            setVisible('authentication');
          } else {
            setVisible('openAccount');
          }
        },
      });
    }
  };

  //点击余额充值
  const balanceRechargeClick = () => {
    if (!hasOpenClassIIAccount) {
      let content = '您还未开户，请先完成开户绑卡操作，再进行充值！';
      if (hasOpenAccount) {
        content =
          '鉴于银行监管要求，为了不影响后续系统操作，需要您完善资料进行实名验证，才能进行充值操作！';
      }
      Modal.confirm({
        content,
        title: '温馨提示',
        okText: '下一步',
        onOk() {
          if (Object.keys(accountExtend).length == 0) {
            setVisible('authentication');
          } else {
            setVisible('openAccount');
          }
        },
      });
    } else {
      if (needBindCard) {
        //需要绑卡
        Modal.confirm({
          content: '您还未开户，请先完成开户绑卡操作，再进行充值！',
          title: '温馨提示',
          okText: '去开户',
          onOk() {
            let timer = setTimeout(() => {
              navigate('/account/safety');
              clearTimeout(timer);
              timer = null;
            }, 200);
          },
        });
      } else {
        setVisible('balanceRechargeModal');
      }
    }
  };

  //手机号modal
  const PhoneModalProps = {
    phoneModalSwitch: true,
    personageMessage: accountDetail,
    phoneModalOk() {
      getAccountInfo();
      setVisible(0);
    },
    phoneModalNo: function () {
      setVisible(0);
    },
  };

  //支付密码modal
  const PayModalProps = {
    PayModalSwitch: true,
    personageMessage: accountDetail,
    PayModalOk() {
      getAccountInfo();
      setVisible(undefined);
    },
    PayModalNo() {
      setVisible(undefined);
    },
  };

  // 普通充值modal
  const RechargeModalProps = {
    visible: true,
    handleVisible(val) {
      setVisible(val);
    },
    reloadFunc() {
      dispatch({
        type: 'add',
      });
    },
  };

  //扫码充值modal
  const ScanRechargeModalProps = {
    handleVisible() {
      setVisible(false);
    },
    reloadFunc() {
      dispatch({
        type: 'add',
      });
    },
  };

  //转账充值modal
  const TransferModalProps = {
    bankDetail,
    handleCancel() {
      setVisible(0);
      dispatch({
        type: 'add',
      });
    },
  };

  //余额充值弹窗
  const balanceRechargeModalProps = {
    isSign,
    accountExtend,
    userAccountType,
    getAuthenticationInfo,
    handleOk() {
      getAccountInfo();
      setVisible(false);
      dispatch({
        type: 'add',
      });
    },
    handleCancel() {
      setVisible(false);
    },
  };

  //开二类户弹窗
  const openAccountModalProps = {
    title: hasOpenAccount ? '补充资料' : '开通账户',
    handleOk() {
      getAccountInfo();
      if (referType == 'recharge') {
        setVisible('balanceRechargeModal'); //余额充值
      } else if (referType == 'applyCash') {
        setVisible(false);
        navigate('/account/applyCash');
      }
    },
    handleCancel() {
      setVisible(false);
    },
  };

  //开户
  const AttestationDetailProps = {
    visible: visible == 'openAccount',
    isOpen: true, //是否是开户
    // accountExtend,
    userAccountType,
    getAuthenticationInfo,
    handleCancel() {
      setVisible(false);
    },
    handUpdataData() {
      //更新所有的数据
      getAccountInfo();
      getOldBindCardInfo();
      getAuthenticationInfo();
      queryBankListDetails();
    },
    handleOk() {
      setVisible(false);
      getAccountInfo();
    },
  };

  //实名认证
  const AddAuthenticationProps = {
    visible: visible == 'authentication',
    accountExtend,
    userAccountType,
    handleCancel() {
      setVisible(false);
    },
    handleOk() {
      setVisible(false);
      getAuthenticationInfo();
      setVisible('openAccount');
    },
  };

  //开启自动支付弹窗
  const OpenPayModalProps = {
    visible: visible == 'payOpen',
    handleCancel() {
      setVisible(false);
    },
    handleOk() {
      setVisible(false);
      getQueryAutoPay();
    },
  };

  //操作日志
  const LogsModalProps = {
    visible: visible == 'logModal',
    orderSn,
    handleCancel() {
      setVisible(false);
    },
  }

  return (
    <div className={styles.container}>
      <div className={styles.infoSection}>
        <div className={styles.iconLeft}>
          <Avatar
            size={48}
            icon={<UserOutlined />}
            src={headImgUrl || ' '}
          ></Avatar>
        </div>
        <div className={styles.textRight}>
          <span>
            <p style={{ margin: '4px 0' }}>
              绑定手机：{mobile ? '已绑定' : '未绑定'}
              <span
                className="common-color1"
                style={{ cursor: 'pointer', marginLeft: 30 }}
                onClick={() => setVisible('updateMobile')}
              >
                {mobile ? '修改' : '绑定'}
              </span>
            </p>
            <p style={{ margin: '4px 0' }}>
              支付密码：{payPassword ? '已设置' : '未设置'}
              <span
                className="common-color1"
                style={{ cursor: 'pointer', marginLeft: 30 }}
                onClick={handlePasswordClick}
              >
                {payPassword ? '修改' : '设置'}
              </span>
            </p>
            {
            currentUser.parentId == 0 && 390078 != currentUser.uuid ?
            <p style={{ margin: '4px 0' }}>
              自动支付：
              <Switch
                checked={openStatus == 1}
                onClick={(e) => handleSwitch(e)}
                size="small"
              />
              <Popover
                content={
                  <div style={{ width: '200px' }}>
                    开通自动支付，需要输入支付密码进行认证。
                    当开通自动支付后，【订单】—【系统订单】中待审核的<span style={{ color: '#ff2d51' }}>代发</span>订单审核通过，并且账期或余额足够支付该订单，则自动完成付款。
                  </div>
                }
              >
                <span>
                  <IconFont
                    type="iconjingshi"
                    style={{
                      fontSize: '16px',
                      marginLeft: '6px',
                      cursor: 'pointer',
                    }}
                  />
                </span>
              </Popover>
              <span
                className="common-color1"
                style={{ cursor: 'pointer', marginLeft: 30 }}
                onClick={() => {setVisible('logModal')}}
              >
                日志
              </span>
            </p>
            : ''
            }
            {isDushang && (
              <span>
                杜尚自动支付：
                <Switch
                  style={{ marginLeft: '38px', width: '40px' }}
                  checked={isOpen}
                  onClick={(e) => jstAutoPayConfig(e)}
                />
              </span>
            )}
            <p className="common-color9" style={{ fontSize: 12 }}>
              子账号不允许设置、修改支付密码
            </p>
          </span>
        </div>
      </div>
      <div className={styles.amountSection}>
        <div style={{ display: 'flex', flex: 1 }}>
          <div className={styles.iconLeft}>
            <IconFont type="iconbalance" />
          </div>
          <div className={styles.textRight}>
            <span className={styles.flexBox}>
              <div className={styles.amountBox}>
                <div className={styles.amountItem}>
                  可用余额：
                  <span className={`${styles.banlance} common-color9`}>
                    {canUseAmount ? formatAmount(Number(availBalance)) : '***'}
                  </span>{' '}
                  元
                  <span onClick={() => setCanUse(!canUseAmount)}>
                    <IconFont
                      type={canUseAmount ? 'iconzhengyan' : 'iconbiyan'}
                      style={{ fontSize: 16, marginLeft: 6, cursor: 'pointer' }}
                    />
                  </span>
                  <div style={{ display: 'flex', marginTop: '10px' }}>
                    <div className={styles.iconImg}>
                      <img src="https://imgniu.zhaojiafang.com/front-web/ERP/track.png" />
                    </div>
                    <span>您的余额托管于平安银行</span>
                  </div>
                </div>
                <div className={styles.amountItem}>
                  提现待到账：
                  <span className={`${styles.banlance} common-color2`}>
                    {awaitAmount ? formatAmount(Number(cashBalance)) : '***'}
                  </span>{' '}
                  元
                  <span onClick={() => setAwait(!awaitAmount)}>
                    <IconFont
                      type={awaitAmount ? 'iconzhengyan' : 'iconbiyan'}
                      style={{ fontSize: 16, marginLeft: 6, cursor: 'pointer' }}
                    />
                  </span>
                  <div className={styles.amountItemButton}>
                    {/* {accountMsg.isUnionUser ? <Button style={{ marginRight: 30 }} onClick={() => setVisible('scanCharge')}>扫码充值</Button>
									                        : <Button style={{ marginRight: 30 }} onClick={() => setVisible('normalCharge')}>普通充值</Button>}
									<Button onClick={() => history.push('/account/applyCash')}>申请提现</Button> */}
                    {!(
                      (userType == 2 && bigAccount == 2) ||
                      (userType == 3 && hasOpenClassIIAccount && !needBindCard)
                    ) && (
                      <Button
                        style={{ marginRight: '16px' }}
                        //   onClick={() => setVisible('scanCharge')}
                        onClick={scanCodeRecharge}
                      >
                        扫码充值
                      </Button>
                    )}

                    {(userType == 2 && bigAccount == 2) ||
                    (userType == 3 &&
                      hasOpenClassIIAccount &&
                      !needBindCard) ? (
                      <Button
                        style={{ marginRight: '16px' }}
                        onClick={balanceRechargeClick}
                      >
                        余额充值
                      </Button>
                    ) : autoState && !(bankDetail.bindFlag === 0) ? (
                      <div style={{ marginRight: '16px' }}>
                        <Button onClick={transferClick}>转账充值</Button>
                        <div className="common-color9" style={{ fontSize: 12 }}>
                          （免手续费）
                        </div>
                      </div>
                    ) : (
                      ''
                    )}

                    {isOpenOfflineRecharge && (
                      <Button
                        style={{ marginRight: '16px' }}
                        onClick={offlineRechargeClick}
                      >
                        线下充值
                      </Button>
                    )}

                    <Button onClick={applyCashClick}>申请提现</Button>
                  </div>
                </div>
              </div>
            </span>
          </div>
        </div>
        <Divider type="vertical" />
        <div style={{ width: '360px', display: 'flex', marginLeft: '24px' }}>
          <div className={styles.iconLeft}>
            <IconFont type="iconbalance" />
          </div>
          <div className={styles.amountItem} style={{ marginLeft: '16px' }}>
            可抵扣总金额：
            <span className={`${styles.banlance} common-color9`}>
              {deductionAmount
                ? formatAmount(
                    Number(deductionBalance) + Number(purchaseDeductionBalance)
                  )
                : '***'}
            </span>{' '}
            元
            <span onClick={() => setDeduction(!deductionAmount)}>
              <IconFont
                type={deductionAmount ? 'iconzhengyan' : 'iconbiyan'}
                style={{ fontSize: 16, marginLeft: 6, cursor: 'pointer' }}
              />
            </span>
            <div style={{ display: 'flex', marginTop: '10px' }}>
              <Button onClick={() => handleJump({ step: 2, todo: 200 })}>
                退款抵扣详情
              </Button>
            </div>
          </div>
        </div>
      </div>
      {/* 绑定手机号修改 */}
      {visible == 'updateMobile' && <PhoneModal {...PhoneModalProps} />}

      {/* 支付密码修改 */}
      {visible == 'updatePassword' && <PayModal {...PayModalProps} />}

      {/* 普通充值 */}
      {visible == 'normalCharge' && <RechargeModal {...RechargeModalProps} />}

      {/* 扫码充值 */}
      {visible == 'scanCharge' && (
        <ScanRechargeModal {...ScanRechargeModalProps} />
      )}

      {/* 转账充值 */}
      {visible == 'transferCharge' && <TransferModal {...TransferModalProps} />}

      {/* 余额充值 */}
      {visible == 'balanceRechargeModal' && (
        <BalanceRechargeModal {...balanceRechargeModalProps} />
      )}

      {/* 二类户开户绑卡一体化流程 */}
      {visible == 'openSecondAccount' && (
        <SecondAccountModal {...openAccountModalProps} />
      )}

      {/* 开户 */}
      {visible == 'openAccount' && (
        <AttestationDetail {...AttestationDetailProps} />
      )}

      {/* 实名认证 */}
      {visible == 'authentication' && (
        <AddAuthentication {...AddAuthenticationProps} />
      )}

      {/*开通自动支付 */}
      {visible == 'payOpen' && <OpenPayModal {...OpenPayModalProps} />}
      
      {/*日志 */}
      {visible == 'logModal' && <LogsModal {...LogsModalProps} />}
      

      {loading && <CommonLoading loading={true} />}
    </div>
  );
};

export default UserInfo;
